if the visible of card button "Hilighter" is true then
hide card button "Hilighter"
set the name of ThisName to "SHOW the Hilighter Button"
else
show card button "Hilighter"
set the name of ThisName to "HIDE the Hilighter Button"
end if
end mouseUp
-- part 3 (button)
-- low flags: 80
-- high flags: 4000
-- rect: left=281 top=83 right=95 bottom=483
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hilighter
-- part 4 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=281 top=54 right=76 bottom=450
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Enter items into list
----- HyperTalk script -----
on mouseUp
ask "What do you want to put in the list?"
put it into ThisItem
if it is empty then exit mouseUp
put the number of lines of card field ID 1 into TotalLines
answer "On what line do you want to put it?" with "Line #" or "end of list"
if it is "Line #" then
ask "Enter the line number"
put it into ThisLine
if it is empty then exit mouseUp
put ThisItem & Return before line ThisLine of card field ID 1
else
put ThisItem & Return after line TotalLines of card field ID 1
end if
end mouseUp
-- part 5 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=281 top=28 right=50 bottom=450
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: List is LOCKED
----- HyperTalk script -----
on mouseUp
put the name of the target into ThisName
if locktext of card field ID 1 is true then
set locktext of card field ID 1 to false
set the hilite of ThisName to True
set the name of ThisName to "List is UN-LOCKED"
else
set locktext of card field ID 1 to true
set the hilite of ThisName to false
set the name of ThisName to "List is LOCKED"
end if
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=281 top=269 right=291 bottom=381
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Sort List
----- HyperTalk script -----
on copyright
-- Super Delete, Copyright by Mac Help Co., January 1988
-- by Chris Hostetter, Mac Help Co., 1800 East Market Street
-- Long Beach, CA 90805, (213) 428-7414
-- The script for this button is copyrighted and may not be
-- used without the written permission of the author (above).
end copyright
on mouseUp
Global TrapFieldName
-- Uses the script "on MouseWithin" located in the script of the stack
set the loc of the message box to 20,300
put "MOVE pointer inside field list to Sort then press" && "COMMAND KEY down."
put "Sort List" into TrapFieldName
put empty into LastField
end mouseUp
-- part 7 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=440 top=24 right=39 bottom=500
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: See Script
----- HyperTalk script -----
on mouseUp
edit script of card button ID 5
end mouseUp
-- part 8 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=439 top=51 right=66 bottom=499
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: See Script
----- HyperTalk script -----
on mouseUp
edit script of card button ID 4
end mouseUp
-- part 9 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=452 top=70 right=85 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: See Script
----- HyperTalk script -----
on mouseUp
edit script of card field "Item Select"
end mouseUp
-- part 10 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=374 top=267 right=282 bottom=434
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: See Script
----- HyperTalk script -----
on mouseUp
edit script of card Button "Sort List"
end mouseUp
-- part contents for background part 8
----- text -----
Card 12 of 20
-- part contents for background part 9
----- text -----
ITEM SELECT
This field allows you to select any item in the list by simply clicking on the item.
The item will be put in the global variable called 'THISITEM'
This field works well both as a scrolling field, or as a rectangle field (or any type of field. ) It must be locked for it to work. You could temporarily unlock the field to type in it, or you could use commands (click on the button 'Enter items into list') to insert items into the list.
You can make a transparent button titled HILIGHTER, and it will automatically position itself of the selected field for visual feedback.
SORT LIST
The script of the sort list button is located in the stack scripts section (see on SortList). It will remove every blank line in a field, and then sort every remaining line in the field. The field name should be put into the global variable LASTFIELD.